// Want to support my work 🤝? https://buymeacoffee.com/vandad
// 内容缩放
import 'package:flutter/material.dart';

const dashes = [
  'https://media.gokols.cn/upload/1412731843056373760.JPG',
  'https://photo.tuchong.com/14649482/f/601672690.jpg',
  'https://photo.tuchong.com/17325605/f/641585173.jpg',
  'https://photo.tuchong.com/3541468/f/256561232.jpg',
  'https://photo.tuchong.com/16709139/f/278778447.jpg',
  'https://photo.tuchong.com/15195571/f/233361383.jpg',
  'https://photo.tuchong.com/5040418/f/43305517.jpg',
  'https://photo.tuchong.com/3019649/f/302699092.jpg'
];

class PlacingConstraintsPage extends StatelessWidget {
  const PlacingConstraintsPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('PlacingConstraints'),
      ),
      body: InteractiveViewer(
        minScale: 1.0,
        maxScale: 2.0,
        child: SingleChildScrollView(
          scrollDirection: Axis.vertical,
          child: Table(
            defaultVerticalAlignment: TableCellVerticalAlignment.middle,
            children: dashes
                .map(
                  (dash) => TableRow(
                    children: [
                      ConstrainedBox(
                        constraints: BoxConstraints(
                          minHeight: 300,
                        ),
                        child: Image.network(dash),
                      ),
                    ],
                  ),
                )
                .toList(),
          ),
        ),
      ),
    );
  }
}
